from datetime import datetime

from pydantic import BaseModel, Field
from schemas import GMT


class CaseListIn(BaseModel):
    name: str = Field(example="用例列表名称")
    description: str = Field(example="用例列表描述")
    createName: str = Field(example="创建者")
    updateName: str = Field(example="最后更新人")
    status: bool = Field(example=True)
    projectId: int = Field(example="项目ID")


class CaseListCreate(CaseListIn):
    pass


class CaseListUpdate(CaseListIn):
    pass


class CaseListOut(CaseListIn, GMT):
    id: int = Field(example="编号")

    class Config:
        orm_mode = True
